package com.xxxx.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.vo.LoginVo;
import com.xxxx.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author:王亚栋
 * @Date:2023/2/12 17:14
 * @Version:1.0
 */
public interface UserService extends IService<User> {

    /**
     * 用户登录
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean doLogin(LoginVo loginVo,
                     HttpServletRequest request,
                     HttpServletResponse response);

    /**
     * 根据cookie 获取用户
     * @param userTicket
     * @return
     */
    User getUserByCookie(String userTicket,
                         HttpServletRequest request,
                         HttpServletResponse response);
}
